package com.xmy.cultivate.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmy.cultivate.entity.ClassRoom;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * <p>
 * 教室 Mapper 接口
 * </p>
 *
 * @author min
 * @since 2022-07-26
 */
public interface ClassRoomMapper extends BaseMapper<ClassRoom> {

    @Select("select id,name,school_id,getSchoolName(school_id) as schoolName from class_room ${ew.customSqlSegment}")
    public abstract IPage<Map<String,Object>> findAll(IPage<?> page, @Param(Constants.WRAPPER) Wrapper wrapper);
}
